import java.util.Scanner;

public class Main5 {
	public static void main(String[] args) {
		  Scanner sc=new Scanner(System.in);
		  while(sc.hasNext())
		  {
		     double x=sc.nextDouble();
		     if(x<0)
		    	 System.out.printf("NaN");
		     else
		     {   
		    	 double y=0;
		    	 double i=0;
		    	 while(y<x && x-y>0.0001)
		         {
		    		 i+=0.0001;
		        	 y=Math.pow(i, 2);
		         }
		         System.out.printf("%.6f\n",i);
		     }
		  }
	}
}
